Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors how the Observatory React UI is served by the Vite plugin by switching from disk-served static assets to virtual modules, and updates the UI build to emit a single JS/CSS bundle with React externalized for runtime resolution.
Changes:
- Updated
uiPluginto serve/__observatoryvia a virtual JS module and on-the-fly HTML generation (with CSS inlined). - Updated the UI Vite build to produce
observatory-uilibrary output and externalize React-related dependencies. - Added a changelog documenting the UI serving and bundling changes.
Show a summary per file
| File | Description |
|---|---|
vite.config.ui.ts |
Switches UI build to a lib build output and externalizes React dependencies for host resolution. |
src/plugin/uiPlugin.ts |
Replaces static file serving with virtual-module JS delivery and generated HTML (inlining built CSS). |
CHANGELOG.md |
Documents the UI serving refactor and React externalization. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
UI Serving Refactor:
uiPluginnow serves the Observatory UI at/__observatoryusing a virtual module for both JS and CSS, generating the HTML response on the fly instead of serving static files from diskBuild System Updates:
vite.config.ui.ts) is updated to produce a single JS and CSS bundle (observatory-ui.jsandobservatory-ui.css) as a library build, with React and related packages externalized for runtime resolution.